Ideal gas
An ideal gas is composed of particles only interacting together via elastic collisions, at equilibrium, such that the energy density is, statistically, identical in all parts of the system.
Boltzmann statistics
Consider a set of $N$ point-particles, each with an identical mass $m$. Despite their identical characteristics, we can distinguish each particle (we are doing clasical mechanics here so we could simply rewind the system to find out where each particle came from, for instance). The total energy is
\begin{equation} E = \sum_{i = 1}^N \frac{m}{2} \dot{\vec{x}}(t) \cdot \dot{\vec{x}}(t) \end{equation}As we are dealing with an elastic collision system here, this energy will remain constant. We are not dealing here quite yet with quantum mechanics, but we will make a very quantum assumption here : there is a discrete set of energies $\left\{ \varepsilon_i \right\}$ each particle may have. The energy can therefore be written as
\begin{equation} E = \sum_{i = 1}^\infty n_i \varepsilon_i \end{equation}where $n_i$ is the number of particles with energy $\varepsilon_i$.